package com.platform.vo;

import lombok.Data;

@Data
public class BatchResult {

    private Long totalCount = 0L;
    private Long errorCount = 0L;
    // 入库缓存数据
    private Long cachedCount = 0L;

    private Long skippedCount = 0L;

    private Long processCount = 0L;

    private Long filterCount = 0L;


    private String jobId;
    private String jobStatus;


    public Long getCachedCount() {
        if (totalCount == 0) {
            return totalCount;
        }
        return totalCount - errorCount - filterCount - skippedCount;
    }

    public void increaseErrorCount() {
        errorCount++;
    }

    public void increaseProcessCount() {
        processCount++;
    }


}
